using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
using SolutionFactory.Services;

namespace SolutionFactory.Exporter
{
    public class LogZipEvent : FastZipEvents
    {
        private readonly ILogger _logger;

        public LogZipEvent(ILogger logger)
        {
            _logger = logger;
            base.ProcessFile += LogFile;
        }

        private void LogFile(object sender, ScanEventArgs e)
        {
            _logger.Log("Zipping file: " + e.Name);
        }
    }
}